package com.binarysoft.service.user;

import java.util.Collection;

import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.type.JdbcType;

public interface UserInfoDAO extends UserInfoMapper {
	 @Select({
	        "select",
	        "id, name, surname, description, email, phone_num, locale, active, deleted, login_id, ",
	        "login_pass, creation_time, last_updated_time, last_login_time",
	        "from user_info"
	    })
	    @Results({
	        @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
	        @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
	        @Result(column="surname", property="surname", jdbcType=JdbcType.VARCHAR),
	        @Result(column="description", property="description", jdbcType=JdbcType.VARCHAR),
	        @Result(column="email", property="email", jdbcType=JdbcType.VARCHAR),
	        @Result(column="phone_num", property="phoneNum", jdbcType=JdbcType.VARCHAR),
	        @Result(column="locale", property="locale", jdbcType=JdbcType.VARCHAR),
	        @Result(column="active", property="active", jdbcType=JdbcType.INTEGER),
	        @Result(column="deleted", property="deleted", jdbcType=JdbcType.INTEGER),
	        @Result(column="login_id", property="loginId", jdbcType=JdbcType.VARCHAR),
	        @Result(column="login_pass", property="loginPass", jdbcType=JdbcType.VARCHAR),
	        @Result(column="creation_time", property="creationTime", jdbcType=JdbcType.DATE),
	        @Result(column="last_updated_time", property="lastUpdatedTime", jdbcType=JdbcType.DATE),
	        @Result(column="last_login_time", property="lastLoginTime", jdbcType=JdbcType.DATE)
	    })
	    Collection<UserInfo> selectAll();
}
